<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>openid.consumer.consumer.AuthRequest</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="openid-module.html">Package&nbsp;openid</a> ::
        <a href="openid.consumer-module.html">Package&nbsp;consumer</a> ::
        <a href="openid.consumer.consumer-module.html">Module&nbsp;consumer</a> ::
        Class&nbsp;AuthRequest
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="openid.consumer.consumer.AuthRequest-class.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF CLASS DESCRIPTION =========== -->
<h2 class="class">Type AuthRequest</h2>

<pre class="base-tree">
<a href="__builtin__.object-class.html"><code>object</code></a> --+
         |
        <b>AuthRequest</b>
</pre><br />

<hr/>

<p>An object that holds the state necessary for generating an OpenID 
authentication request. This object holds the association with the server 
and the discovered information with which the request will be made.</p>
It is separate from the consumer because you may wish to add things to 
the request before sending it on its way to the server. It also has 
serialization options that let you encode the authentication request as a 
URL or as a form POST.
<hr/>


<!-- =========== START OF METHOD SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Method Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#__init__" class="summary-sig-name"><code>__init__</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>endpoint</span>,
          <span class=summary-sig-arg>assoc</span>)</span></code>
<br />
Creates a new AuthRequest object.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#addExtension" class="summary-sig-name"><code>addExtension</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>extension_request</span>)</span></code>
<br />
Add an extension to this checkid request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#addExtensionArg" class="summary-sig-name"><code>addExtensionArg</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>namespace</span>,
          <span class=summary-sig-arg>key</span>,
          <span class=summary-sig-arg>value</span>)</span></code>
<br />
Add an extension argument to this OpenID authentication request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#formMarkup" class="summary-sig-name"><code>formMarkup</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>realm</span>,
          <span class=summary-sig-arg>return_to</span>,
          <span class=summary-sig-arg>immediate</span>,
          <span class=summary-sig-arg>form_tag_attrs</span>)</span></code>
<br />
Get html for a form to submit this request to the IDP.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        <a href="openid.message.Message-class.html" 
        class="link"><code>openid.message.Message</code></a>
</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#getMessage" class="summary-sig-name"><code>getMessage</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>realm</span>,
          <span class=summary-sig-arg>return_to</span>,
          <span class=summary-sig-arg>immediate</span>)</span></code>
<br />
Produce a <a href="openid.message.Message-class.html" 
class="link"><code>openid.message.Message</code></a> representing this 
request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        str
</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#redirectURL" class="summary-sig-name"><code>redirectURL</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>realm</span>,
          <span class=summary-sig-arg>return_to</span>,
          <span class=summary-sig-arg>immediate</span>)</span></code>
<br />
Returns a URL with an encoded OpenID request.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#setAnonymous" class="summary-sig-name"><code>setAnonymous</code></a>(<span class=summary-sig-arg>self</span>,
          <span class=summary-sig-arg>is_anonymous</span>)</span></code>
<br />
Set whether this request should be made anonymously.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">        bool
</font></td>
  <td><code><span class="summary-sig"><a href="openid.consumer.consumer.AuthRequest-class.html#shouldSendRedirect" class="summary-sig-name"><code>shouldSendRedirect</code></a>(<span class=summary-sig-arg>self</span>)</span></code>
<br />
Should this OpenID authentication request be sent as a HTTP redirect 
or as a POST (form submission)?</td></tr>
  <tr><td colspan="2">
    <b>Inherited from <a href="__builtin__.object-class.html"><code>object</code></a>:</b>
      <a href="__builtin__.object-class.html#__delattr__"><code>__delattr__</code></a>, 
      <a href="__builtin__.object-class.html#__getattribute__"><code>__getattribute__</code></a>, 
      <a href="__builtin__.object-class.html#__hash__"><code>__hash__</code></a>, 
      <a href="__builtin__.object-class.html#__new__"><code>__new__</code></a>, 
      <a href="__builtin__.object-class.html#__reduce__"><code>__reduce__</code></a>, 
      <a href="__builtin__.object-class.html#__reduce_ex__"><code>__reduce_ex__</code></a>, 
      <a href="__builtin__.object-class.html#__repr__"><code>__repr__</code></a>, 
      <a href="__builtin__.object-class.html#__setattr__"><code>__setattr__</code></a>, 
      <a href="__builtin__.object-class.html#__str__"><code>__str__</code></a>
    </td></tr>
</table><br />


<!-- =========== START OF METHOD DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Method Details</th></tr>
</table>

<a name="__init__"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">__init__</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>endpoint</span>,
          <span class=sig-arg>assoc</span>)</span>
    <br /><i>(Constructor)</i>
  </h3>
  <p>Creates a new AuthRequest object. This just stores each argument in 
  an appropriately named field.</p>
  Users of this library should not create instances of this class. 
  Instances of this class are created by the library when needed.
  <dl><dt></dt><dd>
    <dl><dt><b>Overrides:</b></dt>
      <dd><a href="__builtin__.object-class.html#__init__"><code>__builtin__.object.__init__</code></a></dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="addExtension"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">addExtension</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>extension_request</span>)</span>
  </h3>
  Add an extension to this checkid request.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>extension_request</b></code> -
         An object that implements the extension interface for adding 
        arguments to an OpenID message.
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="addExtensionArg"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">addExtensionArg</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>namespace</span>,
          <span class=sig-arg>key</span>,
          <span class=sig-arg>value</span>)</span>
  </h3>
  <p>Add an extension argument to this OpenID authentication request.</p>
  Use caution when adding arguments, because they will be URL-escaped 
  and appended to the redirect URL, which can easily get quite long.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>namespace</b></code> -
         The namespace for the extension. For example, the simple 
        registration extension uses the namespace <code>sreg</code>.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      <dd><code><b>key</b></code> -
         The key within the extension namespace. For example, the 
        nickname field in the simple registration extension's key is 
        <code>nickname</code>.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      <dd><code><b>value</b></code> -
         The value to provide to the server for this argument.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="formMarkup"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">formMarkup</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>realm</span>,
          <span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>immediate</span>=<span class=sig-default>False</span>,
          <span class=sig-arg>form_tag_attrs</span>=<span class=sig-default>None</span>)</span>
  </h3>
  Get html for a form to submit this request to the IDP.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>form_tag_attrs</b></code> -
         Dictionary of attributes to be added to the form tag. 
        'accept-charset' and 'enctype' have defaults that can be 
        overridden. If a value is supplied for 'action' or 'method', it 
        will be replaced.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type={unicode: unicode})</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="getMessage"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">getMessage</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>realm</span>,
          <span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>immediate</span>=<span class=sig-default>False</span>)</span>
  </h3>
  Produce a <a href="openid.message.Message-class.html" 
  class="link"><code>openid.message.Message</code></a> representing this 
  request.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>realm</b></code> -
         The URL (or URL pattern) that identifies your web site to the 
        user when she is authorizing it.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      <dd><code><b>return_to</b></code> -
         <p>The URL that the OpenID provider will send the user back to 
        after attempting to verify her identity.</p>
        Not specifying a return_to URL means that the user will not be 
        returned to the site issuing the request upon its completion.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      <dd><code><b>immediate</b></code> -
         If True, the OpenID provider is to send back a response 
        immediately, useful for behind-the-scenes authentication 
        attempts. Otherwise the OpenID provider may engage the user 
        before providing a response. This is the default case, as the 
        user may need to provide credentials or approve the request 
        before a positive response can be sent.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=bool)</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        <a href="openid.message.Message-class.html" 
        class="link"><code>openid.message.Message</code></a>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="redirectURL"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">redirectURL</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>realm</span>,
          <span class=sig-arg>return_to</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>immediate</span>=<span class=sig-default>False</span>)</span>
  </h3>
  <p>Returns a URL with an encoded OpenID request.</p>
  <p>The resulting URL is the OpenID provider's endpoint URL with 
  parameters appended as query arguments. You should redirect the user 
  agent to this URL.</p>
  OpenID 2.0 endpoints also accept POST requests, see <code><a 
  href="openid.consumer.consumer.AuthRequest-class.html#shouldSendRedirect" 
  class="link"><code>shouldSendRedirect</code></a></code> and <code><a 
  href="openid.consumer.consumer.AuthRequest-class.html#formMarkup" 
  class="link"><code>formMarkup</code></a></code>.
  <dl><dt></dt><dd>
    <dl><dt><b>Parameters:</b></dt>
      <dd><code><b>realm</b></code> -
         The URL (or URL pattern) that identifies your web site to the 
        user when she is authorizing it.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      <dd><code><b>return_to</b></code> -
         <p>The URL that the OpenID provider will send the user back to 
        after attempting to verify her identity.</p>
        Not specifying a return_to URL means that the user will not be 
        returned to the site issuing the request upon its completion.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      <dd><code><b>immediate</b></code> -
         If True, the OpenID provider is to send back a response 
        immediately, useful for behind-the-scenes authentication 
        attempts. Otherwise the OpenID provider may engage the user 
        before providing a response. This is the default case, as the 
        user may need to provide credentials or approve the request 
        before a positive response can be sent.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=bool)</i>
      </dd>
    </dl>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        The URL to redirect the user agent to.
        <br /><i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        (type=str)</i>
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>

<a name="setAnonymous"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">setAnonymous</span>(<span class=sig-arg>self</span>,
          <span class=sig-arg>is_anonymous</span>)</span>
  </h3>
  <p>Set whether this request should be made anonymously. If a request is 
  anonymous, the identifier will not be sent in the request. This is only 
  useful if you are making another kind of request with an extension in 
  this request.</p>
  Anonymous requests are not allowed when the request is made with 
  OpenID 1.
  <dl><dt></dt><dd>
    <dl><dt><b>Raises:</b></dt>
      <dd><code><b>ValueError</b></code> -
        when attempting to set an OpenID1 request as anonymous
    </dl>
  </dd></dl>
</td></tr></table>

<a name="shouldSendRedirect"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">shouldSendRedirect</span>(<span class=sig-arg>self</span>)</span>
  </h3>
  Should this OpenID authentication request be sent as a HTTP redirect 
  or as a POST (form submission)?
  <dl><dt></dt><dd>
    <dl><dt><b>Returns:</b></dt>
      <dd>
        bool
      </dd>
    </dl>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="openid-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://openidenabled.com/python-openid/">Python-OpenID</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Fri Dec 14 16:10:53 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
